package com.homework.test2;

import java.util.Random;

public class Demo6 {
    public static void main(String[] args) {
        Random random = new Random();
        int[] arr = new int[5];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = random.nextInt(100 + 1);
        }
        int count = 0;
        for (int i : arr) {
            if (i<10){
                System.out.println(i+" ");
                count++;
            }
        }
        if (count==0){
            System.out.println("未找到合适的数据");
        }
    }
}
